package de.koller.gravity.mech.universe;

import de.koller.gravity.mech.particle.Particle;

public class PlanetaryMass extends Particle {
	
	private double mass;
	public boolean invalid = false;
	
	public PlanetaryMass( double mass ) {
		setMass( mass );
		this.color = 0xffffffff;
	}

	public double getMass() {
		return mass;
	}

	public void setMass( double mass ) {
		this.mass = mass;
		double k = 500;
		this.size = Math.pow( (mass*k) / (4d/4d*Math.PI ), 1d/3d ) * 2;
		//Math.
		//V = 4/3 * Pi * r3
		//(V / ((4/3)*pi))^3 = r
	}

	public static void main( String[] args ) {
		PlanetaryMass p = new PlanetaryMass( 1 );
		System.out.println( p.size );
	}
}
